@use "../core/color";
@use "../core/typography";

// Annotation card
// ---------------
// Styles for the annotation card which is displayed in the
// results of activity queries.

.annotation-card {
  @include typography.font-normal;
  border: 1px solid color.$grey-2;
  list-style: none;
  padding: 15px;
  margin-bottom: 10px;
  box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.1);
  background: white;
  overflow-wrap: break-word;
}

.annotation-card:hover {
  box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.15);

  .annotation-card__quote {
    border-left: color.$highlight 3px solid;
    color: color.$grey-5;
  }

  .annotation-card__timestamp {
    color: color.$grey-5;
  }
}

.annotation-card__header {
  margin-bottom: 15px;
  align-items: baseline;
}

.annotation-card__username-timestamp {
  display:flex;
  flex-direction: row;
  justify-content: space-between;
}

.annotation-card__share-info {
  display:flex;
  flex-direction: row;
  margin-top: 5px;
}

.annotation-card__tags {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

.annotation-card__tag {
  text-decoration: none;
  border: 1px solid color.$grey-3;
  border-radius: 2px;
  padding: 0 5px 2px;
  color: color.$grey-5;
  background: color.$grey-1;
  margin: 0 5px 5px 0;
  font-size: typography.$small-font-size;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.annotation-card__footer {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: baseline;
}

.annotation-card__footer-link {
  margin-left: 15px;
  color: color.$grey-4;
  height: 16px;
  width: 16px;
}

.annotation-card__incontext-link {
  /* the arrow for context links is vsually larger
      we need to adjust that here to make it look uniform */
  height: 14px;
  width: 14px;
  padding-top: 1px;
}

.annotation-card__incontext-link:visited {
  color: color.$grey-5;
}

.annotation-card__username {
  color: color.$grey-7;
  font-weight: bold;
}

.annotation-card__is-private {
  color: color.$grey-5;
}

.annotation-card__is-private-icon {
  height: 10px;
  width: 10px;
}

.annotation-card__groupname {
  color: color.$grey-6;
  margin-right: 5px;
}

.annotation-card__groupname:visited {
  color: color.$grey-6;
}

.annotation-card__groups-icon {
  height: 10px;
  width: 10px;
  color: color.$grey-6;
}

.annotation-card__timestamp {
  @include typography.font-small;
  color: color.$grey-4;
}

.annotation-card__quote {
  padding: 0 10px;
  overflow-wrap: break-word;
  color: color.$grey-4;
  font-family: sans-serif;
  font-size: 12px;
  font-style: italic;
  letter-spacing: 0.1px;
  border-left: 3px solid color.$grey-3;
  margin-bottom: 10px;
  margin-left: 0;
  margin-right: 0;
}

.annotation-card__text {
  @include typography.styled-text;
  overflow-wrap: break-word;
}
